package com.dao;

import com.github.pagehelper.Page;
import com.pojo.CheckItem;
import org.apache.ibatis.annotations.Delete;

import java.util.List;

/*检查项dao*/
public interface CheckItemDao {
    //查询所有检查项
    public List<CheckItem> findAllCheckTtem();
    //增加一条检查项数据
    public int insertCheckTtem(CheckItem checkItem);
    //分页查询检查项
    public Page<CheckItem> findByPage(String name);
    //删除一条检查项
    //先删除关联表的
    @Delete("DELETE FROM t_checkgroup_checkitem WHERE checkitem_id=#{id}")
    public int deletegroupitemById(int id);
    //再删除主表
    @Delete("DELETE FROM t_checkitem WHERE id=#{id}")
    int deleteCheckItem(int id);
//    <!--动态修改检查项数据数据-->
    int updateCheckItem(CheckItem checkItem);

}
